using System;
using System.Data;
using TimeSheetDAL;

namespace TimeSheetBLL
{

	[TableAttribute("client")]
	[PrimaryKeyAttribute("client_id", "ID")]
	[ColumnAttribute("client_name", "Name")]
	[ColumnAttribute("client_contact", "Contact")]
	[ColumnAttribute("client_email", "Email")]
	[ColumnAttribute("client_phone", "Phone")]
	[ColumnAttribute("active", "Active")]
	public class Client : IDBEntity
	{

		private string name;
		private string contact;
		private string email;
		private string phone;
		private bool active;
		private long iD;

		public Client()
		{
			this.active = true;
		}

		public DataTable GetProjects()
		{
			DBFacade dbf = new DBFacade();
			return dbf.SelectAllProjects( this.iD );
		}

		#region Generated

		public long ID
		{

			get
			{
				return this.iD;
			}set
			 {
				 this.iD = value; 
			 }
		}

		public string Name
		{

			get
			{
				return this.name;
			}set
			 {
				 this.name = value; 
			 }
		}

		public string Contact
		{

			get
			{
				return this.contact;
			}set
			 {
				 this.contact = value; 
			 }
		}

		public string Email
		{

			get
			{
				return this.email;
			}set
			 {
				 this.email = value; 
			 }
		}

		public string Phone
		{

			get
			{
				return this.phone;
			}set
			 {
				 this.phone = value; 
			 }
		}

		public bool Active
		{

			get
			{
				return this.active;
			}set
			 {
				 this.active = value; 
			 }
		}

		#endregion

	}//class
}//namespace